const path = require('path');
const webpack = require('webpack');

module.exports = {
	entry: {
		showdown: './showdown/main.js',
		simplemde: './simplemde/main.js',
	},
	output: {
		filename: '[name].js',
		path: path.resolve(__dirname, 'dist')
	},
	module: {
	    rules: [{
	        test: /\.css$/,
	        use: ['style-loader', 'css-loader']
	    }, {
	        test: /\.less$/,
	        loader: 'style-loader!css-loader!less-loader'
	    }, {
	        test: /\.(png|svg|jpg|gif|woff|woff2|eot|ttf|otf)$/,
	        use: ['file-loader']
	    }]
	},
	plugins:[new webpack.HotModuleReplacementPlugin()],
	devServer: {
        hot: true, // Tell the dev-server we're using HMR
        contentBase: path.resolve(__dirname, 'dist'),
        publicPath: '/'
    },
    devtool: 'inline-source-map'
}